feat(col): modernizing Grid component#30658
Merged
rugoncalves merged 50 commits intonextfrom Sep 17, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BenOsodrac
approved these changes
Aug 28, 2025
This reverts commit 10f3d85.
rugoncalves
commented
Sep 15, 2025
Author
There was a problem hiding this comment.
@ShaneK I see differences in the offset part, but the original, looks incorrect how it was working... but not 100% sure.
Member
There was a problem hiding this comment.
Yeah, I agree. I'm not sure why the original was like that, I don't see any reasoning for it in the code. May be missing something, but I think it's fine for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
The existing grid component (
ion-grid,ion-row, andion-col) in Ionic was developed several years ago and has not received significant updates since then. As a result, it does not leverage modern CSS features. For example, the gutter (spacing) between columns is implemented using the border property, which is an outdated technique.What is the new behavior?
--ion-grid-gap: this new CSS variable, will indicate the gap size in the grid. Defaults to0px- the current value.ion-col: has a new way to calculate the width of the column. Additionally a new propertyorder(and responsive variants) was added, and will control the order of the column.ion-row: uses the newly introduced custom property--ion-grid-gap. This property will indicate the gap size in the grid.Does this introduce a breaking change?
The properties
pullandpushfromion-col, have been removed. The functionality achieved with them, is now achieved with the new propertyorderand the existingsize. More information and migration examples can be read inBREAKING.mdfile.Other information